require 'route'

local function new()
    return {
        route = ROUTE.new(),
    }
end

local function free(self)
    print("free player")
end


local function reply(self, msgid, ...)
    tcpport = self.tcpport
    TCPPORT.reply(tcpport, self.linefd, msgid, unpack(arg));
end


--PLAYER 进行模块跳转
local function import(self, modname) 
    local mod = require(modname)
    mod.import(self)
end

PLAYER = {
    new = new,
    free = free,
    import = import,
    reply = reply,
}


return PLAYER
